import time

def decorator(fn):
	def inner():
		# 获取当前时间秒数，距离1970-1-1 0:0:1
		start_time = time.time()
		fn()
		end_time = time.time()
		result = end_time - start_time
		print("任务执行完成耗时时间为: ", result)
	return inner

@decorator
def task():
	for i in range(2000):
		print(i)

task()